let t = require;
let  e = module
let  o =  e.exports;
 o.default =  e.exports;

                'use strict';
                console.log("start");
                var _n171,
                    i =
                    (this && this.__extends) ||
                    ((_n171 = function n(t, e) {
                            return (_n171 =
                                Object.setPrototypeOf ||
                                ({
                                        __proto__: []
                                    }
                                    instanceof Array &&
                                    function(t, e) {
                                        t.__proto__ = e;
                                    }) ||
                                function(t, e) {
                                    for (var o in e) {
                                        Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                                    }
                                })(t, e);
                        }),
                        function(t, e) {
                            function o() {
                                this.constructor = t;
                            }
                            _n171(t, e),
                                (t.prototype =
                                    null === e ?
                                    Object.create(e) :
                                    ((o.prototype = e.prototype), new o()));
                        }),
                    r =
                    (this && this.__decorate) ||
                    function(t, e, o, n) {
                        var i,
                            r = arguments.length,
                            a =
                            r < 3 ?
                            e :
                            null === n ?
                            (n = Object.getOwnPropertyDescriptor(e, o)) :
                            n;
                        if (
                            'object' ==
                            (typeof Reflect === 'undefined' ?
                                'undefined' :
                                typeof(Reflect)) &&
                            'function' == typeof Reflect.decorate
                        )
                            a = Reflect.decorate(t, e, o, n);
                        else
                            for (var s = t.length - 1; s >= 0; s--) {
                                (i = t[s]) &&
                                (a = (r < 3 ? i(a) : r > 3 ? i(e, o, a) : i(e, o)) || a);
                            }
                        return r > 3 && a && Object.defineProperty(e, o, a), a;
                    };
                Object.defineProperty(o, '__esModule', {
                        value: !0
                    }),
                    (o.TalentUnlockPanel = void 0);
                var a = t('UIPanel'),
                    s = t('UIViewRes'),
                    c = t('UILayer'),
                    l = t('UIMrg'),
                    u = t('ComUtils'),
                    h = t('BagMrg'),
                    p = t('SoundMrg'),
                    f = t('GeneralTips'),
                    d = t('MathUtils'),
                    g = t('UmaSdkHelper'),
                    _ = cc._decorator,
                    y = _.ccclass,
                    C =
                    (_.property,
                        (function(t) {
                            function e() {
                                return (null !== t && t.apply(this, arguments)) || this;
                            }
                            return (
                                i(e, t),
                                (e.prototype.onInit = function() {
                                    t.prototype.onInit.call(this),
                                        this.view.getComponent(cc.Widget),
                                        (this._mask = this.view.getChildByName('mask')),
                                        (this._root = this.view.getChildByName('root')),
                                        (this._txtValue = u.default.getComponent(
                                            cc.Label,
                                            this._root,
                                            'expend/txtValue'
                                        )),
                                        (this._btnUnlock = u.default.getComponent(
                                            cc.Button,
                                            this._root,
                                            'btnUnlock'
                                        )),
                                        this._btnUnlock.node.on(
                                            cc.Node.EventType.TOUCH_END,
                                            this.onTouchUnlockHandler,
                                            this
                                        );
                                }),
                                (e.prototype.onShow = function() {
                                    t.prototype.onShow.call(this);
                                    var e = this.getData();
                                    this.refresh(e.info, e.pt);
                                }),
                                (e.prototype.refresh = function(t, e) {
                                    var o = this.view.convertToNodeSpaceAR(e),
                                        n = 0.5 * this._root.width,
                                        i = 0.5 * this._root.height;
                                    (o.y += i + 50),
                                    (o.x = d.default.clamp(
                                        o.x,
                                        n - this.view.width / 2,
                                        this.view.width / 2 - n
                                    )),
                                    (o.y = d.default.clamp(
                                        o.y,
                                        i - this.view.height / 2,
                                        this.view.height / 2 - i
                                    )),
                                    this._root.setPosition(o),
                                        (this._txtValue.string = 'x' + t.money),
                                        (this._root.scale = 0),
                                        cc
                                        .tween(this._root)
                                        .to(
                                            0.2, {
                                                scale: 1
                                            }, {
                                                easing: 'elasticOut'
                                            }
                                        )
                                        .start();
                                }),
                                (e.prototype.onTouchEvenHandler = function(t) {
                                    t.type == cc.Node.EventType.TOUCH_END &&
                                        t.currentTarget == this.view &&
                                        l.UIMrg.close(this);
                                }),
                                (e.prototype.onTouchUnlockHandler = function() {
                                    if (this._btnUnlock.interactable) {
                                        var t = this.getData(),
                                            e = t.info,
                                            o = t.target;
                                        e.money <= h.BagMrg.ins.getCount(h.BagMrg.GOLD) ?
                                            (e.unlock(),
                                                h.BagMrg.ins.useItem(h.BagMrg.GOLD, e.money),
                                                g.default.military(e.id),
                                                o &&
                                                cc
                                                .tween(o)
                                                .to(0.1, {
                                                    scale: 1.5
                                                })
                                                .to(0.1, {
                                                    scale: 1
                                                })
                                                .start()) :
                                            f.GeneralTips.notEnoughGold(),
                                            p.SoundMrg.click(),
                                            l.UIMrg.close(this);
                                    }
                                }),
                                (e.RES = new s.UIViewRes(
                                    'TalentUnlockView',
                                    'Main',
                                    c.UILayer.PopLayer
                                )),
                                r([y('TalentUnlockPanel')], e)
                            );
                        })(a.default));
                (o.TalentUnlockPanel = C), console.log("end");
            module.exports =  e.exports;